#pragma once

#include <AVUIKeyFrames.h>

namespace AVUI {

class SplineSingleKeyFrame : public TValueSplineKeyFrame<float, SingleKeyFrame>
{
public:
    DECLARE_ELEMENT(SplineSingleKeyFrame, SingleKeyFrame);

    DECLARE_DEPENDENCY_PROPERTY(KeySpline);
    TRefCountedPtr<KeySpline> get_KeySpline() { return (KeySpline*)(Object*)GetValue(get_KeySplineProperty()); }
    void set_KeySpline(KeySpline* pValue) { SetValue(get_KeySplineProperty(), (Object*)pValue); } 

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<SplineSingleKeyFrame>().get_Ptr(); }

private:
    static void StaticConstructor();
};

class SplineDoubleKeyFrame : public TValueSplineKeyFrame<float, DoubleKeyFrame>
{
public:
    DECLARE_ELEMENT(SplineDoubleKeyFrame, DoubleKeyFrame);

    DECLARE_DEPENDENCY_PROPERTY(KeySpline);
    TRefCountedPtr<KeySpline> get_KeySpline() { return (KeySpline*)(Object*)GetValue(get_KeySplineProperty()); }
    void set_KeySpline(KeySpline* pValue) { SetValue(get_KeySplineProperty(), (Object*)pValue); } 

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<SplineDoubleKeyFrame>().get_Ptr(); }

private:
    static void StaticConstructor();
};

class SplinePointKeyFrame : public TValueSplineKeyFrame<Point, PointKeyFrame>
{
public:
    DECLARE_ELEMENT(SplinePointKeyFrame, PointKeyFrame);

    DECLARE_DEPENDENCY_PROPERTY(KeySpline);
    TRefCountedPtr<KeySpline> get_KeySpline() { return (KeySpline*)(Object*)GetValue(get_KeySplineProperty()); }
    void set_KeySpline(KeySpline* pValue) { SetValue(get_KeySplineProperty(), (Object*)pValue); } 

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<SplinePointKeyFrame>().get_Ptr(); }

private:
    static void StaticConstructor();
};

class SplineColorKeyFrame : public TValueSplineKeyFrame<Color, ColorKeyFrame>
{
public:
    DECLARE_ELEMENT(SplineColorKeyFrame, ColorKeyFrame);

    DECLARE_DEPENDENCY_PROPERTY(KeySpline);
    TRefCountedPtr<KeySpline> get_KeySpline() { return (KeySpline*)(Object*)GetValue(get_KeySplineProperty()); }
    void set_KeySpline(KeySpline* pValue) { SetValue(get_KeySplineProperty(), (Object*)pValue); } 

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<SplineColorKeyFrame>().get_Ptr(); }

private:
    static void StaticConstructor();
};

class SplineVector3DKeyFrame : public TValueSplineKeyFrame<Vector3D, Vector3DKeyFrame>
{
public:
    DECLARE_ELEMENT(SplineVector3DKeyFrame, Vector3DKeyFrame);

    DECLARE_DEPENDENCY_PROPERTY(KeySpline);
    TRefCountedPtr<KeySpline> get_KeySpline() { return (KeySpline*)(Object*)GetValue(get_KeySplineProperty()); }
    void set_KeySpline(KeySpline* pValue) { SetValue(get_KeySplineProperty(), (Object*)pValue); } 

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<SplineVector3DKeyFrame>().get_Ptr(); }

private:
    static void StaticConstructor();
};

class SplinePoint3DKeyFrame : public TValueSplineKeyFrame<Point3D, Point3DKeyFrame>
{
public:
    DECLARE_ELEMENT(SplinePoint3DKeyFrame, Point3DKeyFrame);

    DECLARE_DEPENDENCY_PROPERTY(KeySpline);
    TRefCountedPtr<KeySpline> get_KeySpline() { return (KeySpline*)(Object*)GetValue(get_KeySplineProperty()); }
    void set_KeySpline(KeySpline* pValue) { SetValue(get_KeySplineProperty(), (Object*)pValue); } 

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<SplinePoint3DKeyFrame>().get_Ptr(); }

private:
    static void StaticConstructor();
};


class SplineRotation3DKeyFrame : public TReferenceSplineKeyFrame<Rotation3D, Rotation3DKeyFrame>
{
public:
    DECLARE_ELEMENT(SplineRotation3DKeyFrame, Rotation3DKeyFrame);

    DECLARE_DEPENDENCY_PROPERTY(KeySpline);
    TRefCountedPtr<KeySpline> get_KeySpline() { return (KeySpline*)(Object*)GetValue(get_KeySplineProperty()); }
    void set_KeySpline(KeySpline* pValue) { SetValue(get_KeySplineProperty(), (Object*)pValue); } 

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<SplineRotation3DKeyFrame>().get_Ptr(); }

private:
    static void StaticConstructor();
};

}; // namespace AVUI
